/*
 * SearchWithArrays.h
 *
 *  Created on: Jun 1, 2009
 *      Author: ruslan
 */

#ifndef SEARCHWITHARRAYS_H_
#define SEARCHWITHARRAYS_H_

#include <string>
#include "Search.h"

class SearchWithArrays: public Search {
public:
	SearchWithArrays(int weeks, int groupsInWeek, int playersInGroup, long maxIteration);
	virtual ~SearchWithArrays();

	virtual void init();
	virtual int ScheduleIt();

private:
	int** mtrxFreeCouples; // free couples of players for every week. For fast selection
	bool* arrFreePlayersInWeek; // players who wasn't yet selected for playing on the week. For fast selection

	void fillSetOfFreePlayersInWeek(bool value);
	bool getNextPlayerInGroup(int i, int j, int k);
	void snapshot();

};

#endif /* SEARCHWITHARRAYS_H_ */
